home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / clang / nn.zip / PATCH09 < prev    next >
Text File  |  1989-12-31  |  51KB  |  2,041 lines

  1. Subject: nn patch 9
  2. Date: 3 Nov 89 09:11:32 MET (Fri)
  3. From: storm@texas.dk (Kim F. Storm)
  4.  
  5. This is patch #9 to nn.
  6.  
  7. It fixes a number of bugs and add a feature or two.
  8.  
  9. NOTICE
  10. ------
  11.  
  12. This patch changes the name of the variable 'patch-cmd' to
  13. 'patch-command'.
  14.  
  15. BUGS FIXED
  16. ----------
  17.  
  18. When using CBREAK or no flow-control, the help screens and nnadmin no
  19. longer messes up the screen (the missing CR is now printed by nn).
  20.  
  21. When displaying the data in a group with nnadmin G D, the output is
  22. now "paged" (although it could be better).
  23.  
  24. Unique temporary files are now created as needed.  Before you could
  25. risk loosing a newly posted article if posting twice in a row.
  26.  
  27. Long subjects in split folders no longer messes up the menu.
  28.  
  29. The customized article header is now redrawn after help and with ^L.
  30.  
  31. Folders containing headers from :unshar'ed and :decode'd articles can
  32. now be saved in proper mmdf format (before the first ^A^A^A^A line was
  33. missing).
  34.  
  35. nn will now save the proper part of the header when :unshar'ing or
  36. :decode'ing from a folder or a digest (before it saved too much).
  37.  
  38. The :set command will now show integer variables whose value is zero.
  39.  
  40. Killing the last article on a menu while reading it will no longer give
  41. a core dump.
  42.  
  43. Killing the first article on a menu while reading it will no longer
  44. cause the rest of the articles to be skipped.
  45.  
  46. A portability problem in the makefile was fixed (but there are still
  47. problems if the pre-processor converts leading tabs to spaces).
  48.  
  49. The aux script has been fixed to drop messages which are not edited by
  50. the user, i.e. no empty or "included material only" messages can be
  51. sent out.  (It is still possible to forward an article using the mail
  52. command). 
  53.  
  54.  
  55. NEW FEATURES
  56. ------------
  57.  
  58. The following command is now available in reading mode:
  59.  
  60. TAB    {skip-lines}
  61.     Skip lines whose first character is the same as the first
  62.     character on the last displayed line.  This is typically used
  63.     to skip over included text.
  64.     
  65.  
  66. When nnadmin is invoked from nn via :admin, the Group: prompts can now
  67. be answered with an empty line which will select group that was active
  68. when :admin was called.
  69.  
  70.  
  71. There is a new
  72.  
  73.     on term <value of $TERM>
  74.         ...
  75.     end
  76.  
  77. form that can be included in the init files.  It can be used to
  78. adjust nn's behaviour to different kinds of terminals, e.g. on some
  79. terminals the down arrow sends a ^J which may prevent correct
  80. interpretation of the return key when CBREAK is used.  On other
  81. terminals, the left arrow key sends a backspace which may prevent the
  82. erase from working.  Assuming TERM=xyzzy is a terminal with both these
  83. problems, include this in the global (!) init file:
  84.  
  85.     on term xyzzy
  86.         map key down ^J
  87.         set erase-key left 
  88.     end
  89.  
  90.  
  91. There is a new variable 'confirm-entry' that will cause nn to ask
  92. whether a group should be entered before drawing the article menu.
  93. This can be used in slow mode to limit the output:
  94.  
  95.     on slow
  96.         set confirm-entry
  97.     end
  98.  
  99. When it is set, then when nn enters a group with unread articles, it
  100. will first ask:
  101.  
  102.     Enter?
  103.  
  104. Answer (y) to enter the group or (n) to skip to the next group without
  105. updating the current group.  Hitting (interrupt) will cause nn to ask:
  106.  
  107.     Mark as read?
  108.  
  109. Answer (y) to mark the group as read and continue with the next group,
  110. or (n) to skip to the next group without updating the current group.
  111. Hitting (interrupt) again will cause nn to quit immediately.
  112.  
  113.  
  114. There is a new variable unshar-command to control the program invoked
  115. to unpack shell archives with the :unshar command.
  116.  
  117.  
  118. There is a new variable shell-restrictions that can be set in the init
  119. file to prevent the user from escaping out of nn by the normal means
  120. like ! and ^Z, and also prevent changing variables like unshar-command
  121. and printer.  This may be useful for public demonstration purposes.
  122.  
  123. --------------------------- cut here -----------------------------
  124. *** /usr/storm/nn6.3.8/patchlevel.h    Fri Sep 15 19:06:23 1989
  125. --- patchlevel.h    Fri Oct 20 23:01:29 1989
  126. ***************
  127. *** 28,34 ****
  128.    *    hope).
  129.    *
  130.    *    1989-09-15:  Patch 8: pack_name.c nntp.c
  131.    */
  132.   
  133. ! #define PATCHLEVEL 8
  134.   
  135. --- 28,35 ----
  136.    *    hope).
  137.    *
  138.    *    1989-09-15:  Patch 8: pack_name.c nntp.c
  139. +  *    1989-10-20:  Patch 9: several files
  140.    */
  141.   
  142. ! #define PATCHLEVEL 9
  143.   
  144.  
  145. *** /usr/storm/nn6.3.7/admin.c    Fri Sep  8 12:46:40 1989
  146. --- admin.c    Wed Oct 18 21:44:57 1989
  147. ***************
  148. *** 28,39 ****
  149.       if ((c = *pre_input++) == NUL)
  150.           nn_exit(0);
  151.       } else {
  152. !     if (prompt1) printf("%s\n", prompt1);
  153. !     if (prompt2) printf("%s >>>", prompt2);
  154.       fl;
  155.           raw();
  156.       c = get_c();
  157. !     no_raw();
  158.       if (c == K_interrupt)
  159.           s_keyboard++;
  160.       else
  161. --- 28,39 ----
  162.       if ((c = *pre_input++) == NUL)
  163.           nn_exit(0);
  164.       } else {
  165. !     if (prompt1) printf("\r%s\n", prompt1);
  166. !     if (prompt2) printf("\r%s >>>", prompt2);
  167.       fl;
  168.           raw();
  169.       c = get_c();
  170. !     unset_raw();
  171.       if (c == K_interrupt)
  172.           s_keyboard++;
  173.       else
  174. ***************
  175. *** 81,90 ****
  176. --- 81,114 ----
  177.       return get_cmd((char *)NULL, buffer) == 'Y';
  178.   }
  179.   
  180. + char *get_groupname()
  181. + {
  182. +     char * groupname;
  183. +     
  184. +     raw();
  185. +     printf("Group: ");
  186. +     fl;
  187. +     groupname = get_s(NONE, NONE, NONE, group_completion);
  188. +     unset_raw();
  189. +     putchar(NL); putchar(CR);
  190. +     
  191. +     if (groupname == NULL) return NULL;
  192. +     
  193. +     if (groupname[0]) return groupname;
  194.   
  195. +     if (current_group == NULL) return NULL;
  196. +     if (current_group->group_flag & G_FOLDER) return NULL;
  197. +     
  198. +     return current_group->group_name;
  199. + }
  200.   admin_mode(input_string)
  201.   char *input_string;
  202.   {
  203. +     int was_raw = unset_raw();
  204. +     
  205.       if (input_string && *input_string) {
  206.       pre_input = input_string;
  207.       } else {
  208. ***************
  209. *** 149,154 ****
  210. --- 173,179 ----
  211.           break;
  212.           
  213.        case 'Q':
  214. +         if (was_raw) raw();
  215.           return;
  216.       }
  217.       }    
  218. ***************
  219. *** 278,297 ****
  220.       if (c == 'G') {
  221.       char *groupname;
  222.       
  223. !     raw();
  224. !     printf("Group: ");
  225. !     fl;
  226. !     groupname = get_s(NONE, NONE, NONE, group_completion);
  227. !     no_raw();
  228. !     putchar(NL); putchar(CR);
  229. !     
  230. !     if (groupname == NULL) return;
  231.       sprintf(command, "grep '%s' %s/Log | %s",
  232.           groupname, lib_directory, pager);
  233.       system(command);
  234. !     
  235.       goto loop;
  236.       }
  237.   
  238. --- 303,313 ----
  239.       if (c == 'G') {
  240.       char *groupname;
  241.       
  242. !     groupname = get_groupname();
  243.       sprintf(command, "grep '%s' %s/Log | %s",
  244.           groupname, lib_directory, pager);
  245.       system(command);
  246.       goto loop;
  247.       }
  248.   
  249. ***************
  250. *** 311,317 ****
  251.   
  252.       sprintf(command, "grep '^%c:' %s/Log | %s", c, lib_directory, pager);
  253.       system(command);
  254.       goto loop;
  255.   }
  256.   
  257. --- 327,333 ----
  258.   
  259.       sprintf(command, "grep '^%c:' %s/Log | %s", c, lib_directory, pager);
  260.       system(command);
  261. !     
  262.       goto loop;
  263.   }
  264.   
  265. ***************
  266. *** 322,344 ****
  267.       register group_header *gh;
  268.       
  269.    new_group:
  270. !     raw();
  271. !     printf("Group: ");
  272. !     fl;
  273. !     groupname = get_s(NONE, NONE, NONE, group_completion);
  274. !     no_raw();
  275. !     putchar(NL); putchar(CR);
  276.       
  277. -     if (groupname == NULL) return;
  278. -     
  279.       gh = lookup(groupname);
  280.       if (gh == NULL) {
  281.       printf("No group named %s\n", groupname);
  282.       goto new_group;
  283.       }
  284. !  
  285.       for (;;) {
  286.       switch (get_cmd(
  287.   "\nC)lear_flag D)ata E)xpire F)iles G)roup H)eader S)et_flag R)ecollect",
  288. --- 338,351 ----
  289.       register group_header *gh;
  290.       
  291.    new_group:
  292. !     groupname = get_groupname();
  293.       
  294.       gh = lookup(groupname);
  295.       if (gh == NULL) {
  296.       printf("No group named %s\n", groupname);
  297.       goto new_group;
  298.       }
  299.       for (;;) {
  300.       switch (get_cmd(
  301.   "\nC)lear_flag D)ata E)xpire F)iles G)roup H)eader S)et_flag R)ecollect",
  302. ***************
  303. *** 497,503 ****
  304.   
  305.   static show_config()
  306.   {
  307. -     extern char *temp_file;
  308.       extern char news_active[], news_directory[];
  309.   #ifdef NNTP
  310.       extern char nntp_server[];
  311. --- 504,509 ----
  312. ***************
  313. *** 636,641 ****
  314. --- 642,652 ----
  315.       next_article = first_article;
  316.       s_keyboard = 0;
  317.       was_digest = 0;
  318. +     if (!validate) {
  319. +     clrdisp();
  320. +     pg_init(1, 1);
  321. +     }
  322.       
  323.       while (next_article <= gh->last_l_article) {
  324.       if (s_hangup || s_keyboard) goto out;
  325. ***************
  326. *** 652,658 ****
  327.       fseek(data, data_offset, 0);
  328.   
  329.        in_digest:
  330.       next_offset = data_offset;
  331.       if (!db_read_art(data, &hdr, &data_offset)) {
  332.           if (real_offset == gh->data_write_offset || was_digest)
  333. --- 663,673 ----
  334.       fseek(data, data_offset, 0);
  335.   
  336.        in_digest:
  337. !     if (!validate && pg_scroll(6)) {
  338. !         s_keyboard = 1;
  339. !         goto out;
  340. !     }
  341. !     
  342.       next_offset = data_offset;
  343.       if (!db_read_art(data, &hdr, &data_offset)) {
  344.           if (real_offset == gh->data_write_offset || was_digest)
  345.  
  346. *** /usr/storm/nn6.3.7/answer.c    Fri Sep  8 12:46:40 1989
  347. --- answer.c    Thu Oct 19 14:44:26 1989
  348. ***************
  349. *** 10,15 ****
  350. --- 10,17 ----
  351.   export char *extra_news_headers    = NULL;
  352.   export char *mail_record    = NULL;
  353.   export char *news_record    = NULL;
  354. + export char *mail_script    = NULL;
  355. + export char *news_script    = NULL;
  356.   
  357.   export int nn_re_style        = 0;    /* use Re^n: in replies */
  358.   export int include_art_id    = 0;
  359. ***************
  360. *** 30,36 ****
  361.       register FILE *t, *art;
  362.       char *pgm, *first_action, *record_file;
  363.       int edit_message;
  364. !     char *str;
  365.       news_header_buffer nhbuf, dhbuf;
  366.       
  367.       first_action = "edit";
  368. --- 32,38 ----
  369.       register FILE *t, *art;
  370.       char *pgm, *first_action, *record_file;
  371.       int edit_message;
  372. !     char *str, *script;
  373.       news_header_buffer nhbuf, dhbuf;
  374.       
  375.       first_action = "edit";
  376. ***************
  377. *** 66,71 ****
  378. --- 68,74 ----
  379.       ah = NULL;
  380.       
  381.       /* build header */
  382. +     new_temp_file();
  383.       
  384.       if ((t = open_file(temp_file, OPEN_CREATE)) == NULL) {
  385.       msg("Can't create %s", temp_file);
  386. ***************
  387. *** 73,80 ****
  388.       }
  389.   
  390.       ed_line = 0;
  391.       record_file = mail_record;
  392. !     
  393.       if (command == K_REPLY) {
  394.       pgm = "reply";
  395.       ah->flag |= A_ST_REPLY;
  396. --- 76,87 ----
  397.       }
  398.   
  399.       ed_line = 0;
  400. +  follow_to_poster:
  401.       record_file = mail_record;
  402. !     script = mail_script;
  403.       if (command == K_REPLY) {
  404.       pgm = "reply";
  405.       ah->flag |= A_ST_REPLY;
  406. ***************
  407. *** 100,106 ****
  408.       else
  409.           subj_line(t, 0, current_group->group_name, "Your Article in");
  410.       
  411. !     ng_line(t);
  412.       ref_line(t);
  413.       
  414.       end_header(t, extra_mail_headers);
  415. --- 107,113 ----
  416.       else
  417.           subj_line(t, 0, current_group->group_name, "Your Article in");
  418.       
  419. !     ng_line(t, 0);
  420.       ref_line(t);
  421.       
  422.       end_header(t, extra_mail_headers);
  423. ***************
  424. *** 112,122 ****
  425.       }
  426.   
  427.       if (command == K_FOLLOW_UP) {
  428.       pgm = "follow";
  429.       record_file = news_record;
  430.       ah->flag |= A_ST_FOLLOW;
  431.       
  432. !     ng_line(t);
  433.   
  434.       if (news.ng_subj)
  435.           subj_line(t, ah->replies, ah->subject, (char *)NULL);
  436. --- 119,136 ----
  437.       }
  438.   
  439.       if (command == K_FOLLOW_UP) {
  440. +     if (news.ng_follow && strcmp(news.ng_follow, "poster") == 0) {
  441. +         command = K_REPLY;
  442. +         msg("Followup by reply to poster");
  443. +         goto follow_to_poster;
  444. +     }
  445. +     
  446.       pgm = "follow";
  447.       record_file = news_record;
  448. +     script = news_script;
  449.       ah->flag |= A_ST_FOLLOW;
  450.       
  451. !     ng_line(t, 1);
  452.   
  453.       if (news.ng_subj)
  454.           subj_line(t, ah->replies, ah->subject, (char *)NULL);
  455. ***************
  456. *** 232,238 ****
  457.       fclose(t);
  458.       if (art) fclose(art);
  459.       
  460. !     aux_sh(pgm, first_action, record_file,
  461.          command == K_FOLLOW_UP ? "Article not posted" : "Mail not sent");
  462.       
  463.       return edit_message;
  464. --- 246,252 ----
  465.       fclose(t);
  466.       if (art) fclose(art);
  467.       
  468. !     aux_sh(script, pgm, first_action, record_file,
  469.          command == K_FOLLOW_UP ? "Article not posted" : "Mail not sent");
  470.       
  471.       return edit_message;
  472. ***************
  473. *** 284,290 ****
  474.       
  475.       ed_line = -1;
  476.       
  477. !     if (aux_sh("cancel", 
  478.              news.ng_ident, current_group->group_name, "Not canceled"))
  479.       return -1;
  480.           
  481. --- 298,304 ----
  482.       
  483.       ed_line = -1;
  484.       
  485. !     if (aux_sh((char *)NULL, "cancel", 
  486.              news.ng_ident, current_group->group_name, "Not canceled"))
  487.       return -1;
  488.           
  489. ***************
  490. *** 346,351 ****
  491. --- 360,366 ----
  492.       if (str == NULL) return 0;
  493.       if (*str) strcpy(distribution, str);
  494.   
  495. +     new_temp_file();
  496.       if ((t = open_file(temp_file, OPEN_CREATE)) == NULL) {
  497.       msg("Can't create %s", temp_file);
  498.       return 0;
  499. ***************
  500. *** 367,373 ****
  501.   
  502.       fclose(t);
  503.       
  504. !     aux_sh("post", "edit", news_record, "Article not posted");
  505.       
  506.       return 1;
  507.   }
  508. --- 382,388 ----
  509.   
  510.       fclose(t);
  511.       
  512. !     aux_sh(news_script, "post", "edit", news_record, "Article not posted");
  513.       
  514.       return 1;
  515.   }
  516. ***************
  517. *** 399,409 ****
  518.   }
  519.   
  520.   
  521. ! static ng_line(t)
  522.   FILE *t;
  523.   {    
  524.       fprintf(t, "Newsgroups: %s\n", 
  525. !         news.ng_follow ? news.ng_follow : news.ng_groups);
  526.       ed_line++;
  527.   }
  528.   
  529. --- 414,425 ----
  530.   }
  531.   
  532.   
  533. ! static ng_line(t, use_follow)
  534.   FILE *t;
  535. + int use_follow;
  536.   {    
  537.       fprintf(t, "Newsgroups: %s\n", 
  538. !         use_follow && news.ng_follow ? news.ng_follow : news.ng_groups);
  539.       ed_line++;
  540.   }
  541.   
  542. ***************
  543. *** 485,492 ****
  544.    * WARNING: record may be NULL, soit must be the last argument!!
  545.    */
  546.   
  547. ! static aux_sh(prog, action, record, not_sent)
  548. ! char *prog, *action, *record, *not_sent;
  549.   {
  550.       char *args[8];
  551.       char number[10];
  552. --- 501,508 ----
  553.    * WARNING: record may be NULL, soit must be the last argument!!
  554.    */
  555.   
  556. ! static aux_sh(script, prog, action, record, not_sent)
  557. ! char *script, *prog, *action, *record, *not_sent;
  558.   {
  559.       char *args[8];
  560.       char number[10];
  561. ***************
  562. *** 494,500 ****
  563.       time_t start_t;
  564.       
  565.       *ap++ = "nnaux";
  566. !     *ap++ = relative(lib_directory, "aux");
  567.       *ap++ = prog;
  568.   
  569.       if (ed_line >= 0) {    /* not cancel */
  570. --- 510,516 ----
  571.       time_t start_t;
  572.       
  573.       *ap++ = "nnaux";
  574. !     *ap++ = script != NULL ? script : relative(lib_directory, "aux");
  575.       *ap++ = prog;
  576.   
  577.       if (ed_line >= 0) {    /* not cancel */
  578.  
  579. *** /usr/storm/nn6.3.7/aux.sh    Fri Sep  8 12:46:41 1989
  580. --- aux.sh    Fri Oct 20 19:32:49 1989
  581. ***************
  582. *** 89,94 ****
  583. --- 89,106 ----
  584.               $EDITOR $WORK
  585.               ;;
  586.           esac
  587. +         if [ -n "$COPY" ] ; then
  588. +             if [ -s $WORK ] ; then
  589. +                 if cmp -s $WORK $COPY ; then
  590. +                     rm -f $WORK $COPY
  591. +                     exit 22
  592. +                 fi
  593. +             else
  594. +                 rm -f $WORK $COPY
  595. +                 exit 22
  596. +             fi
  597. +             rm -f $COPY
  598. +         fi
  599.           ;;
  600.   
  601.       o*|s*)
  602. ***************
  603. *** 106,121 ****
  604.   done
  605.   
  606.   if [ -n "$COPY" ] ; then
  607. -     if [ -s $WORK ] ; then
  608. -         if cmp -s $WORK $COPY ; then
  609. -             rm -f $WORK $COPY
  610. -             exit 22
  611. -         fi
  612. -     else
  613. -         rm -f $WORK $COPY
  614. -         exit 22
  615. -     fi
  616. -         
  617.       rm -f $COPY
  618.   fi
  619.   
  620. --- 118,123 ----
  621.  
  622. *** /usr/storm/nn6.3.7/execute.c    Fri Sep  8 12:46:42 1989
  623. --- execute.c    Fri Oct 20 21:55:06 1989
  624. ***************
  625. *** 3,10 ****
  626. --- 3,22 ----
  627.   #include "config.h"
  628.   #include "term.h"
  629.   
  630. + export int shell_restrictions = 0;    /* disable shell escapes */
  631.   char *user_shell;
  632.   
  633. + static shell_check()
  634. + {
  635. +     if (shell_restrictions) {
  636. +     msg("Restricted operation - not allowed");
  637. +     return -1;
  638. +     }
  639. +     return 0;
  640. + }
  641.   init_execute()
  642.   {
  643.       if ((user_shell = getenv("SHELL")) == NULL)
  644. ***************
  645. *** 56,61 ****
  646. --- 68,75 ----
  647.       char *cmd;
  648.       int first = 1;
  649.   
  650. +     if (shell_check()) return 0;
  651.       prompt("!");
  652.       
  653.   again:    
  654. ***************
  655. *** 92,97 ****
  656. --- 106,113 ----
  657.   {
  658.       char cmdstring[512];
  659.       
  660. +     if (shell_check()) return 0;
  661.       if (!expand_file_name(cmdstring, command))
  662.       return 0;
  663.       
  664. ***************
  665. *** 121,126 ****
  666. --- 137,144 ----
  667.   {
  668.       int was_raw;
  669.       
  670. +     if (shell_check()) return 0;
  671.       was_raw = unset_raw();
  672.       gotoxy(0, Lines-1);
  673.       clrline();
  674.  
  675. *** /usr/storm/nn6.3.7/folder.c    Fri Sep  8 12:46:42 1989
  676. --- folder.c    Wed Oct 18 18:06:22 1989
  677. ***************
  678. *** 441,457 ****
  679.           length = pack_name(buffer, digest.dg_from, NAME_LENGTH);
  680.           ap->sender = alloc_str(length);
  681.           strcpy(ap->sender, buffer);
  682. !     } else
  683.           ap->sender = "";
  684.       if (digest.dg_subj) {
  685.           length = pack_subject(buffer, digest.dg_subj, &re, 255);
  686.           ap->replies = re;
  687.           ap->subject = alloc_str(length);
  688.           strcpy(ap->subject, buffer);
  689.       } else {
  690.           ap->replies = 0;
  691.           ap->subject = "";
  692.       }
  693.       
  694.       add_article(ap);
  695. --- 441,462 ----
  696.           length = pack_name(buffer, digest.dg_from, NAME_LENGTH);
  697.           ap->sender = alloc_str(length);
  698.           strcpy(ap->sender, buffer);
  699. !         ap->name_length = length;
  700. !     } else {
  701.           ap->sender = "";
  702. !         ap->name_length = 0;
  703. !     }
  704. !     
  705.       if (digest.dg_subj) {
  706.           length = pack_subject(buffer, digest.dg_subj, &re, 255);
  707.           ap->replies = re;
  708.           ap->subject = alloc_str(length);
  709.           strcpy(ap->subject, buffer);
  710. +         ap->subj_length = length;
  711.       } else {
  712.           ap->replies = 0;
  713.           ap->subject = "";
  714. +         ap->subj_length = 0;
  715.       }
  716.       
  717.       add_article(ap);
  718.  
  719. *** /usr/storm/nn6.3.7/global.c    Fri Sep  8 12:46:42 1989
  720. --- global.c    Wed Oct 18 18:00:30 1989
  721. ***************
  722. *** 146,155 ****
  723.       mkdir(nn_directory, 0755);    /* should check here */
  724.       }
  725.       
  726. -     if ((env = getenv("TMPDIR")) == NULL) env = TMP_DIRECTORY;
  727. -     temp_file = mk_file_name(env, "nn.XXXXXX");    /* dies in ANSI C! */
  728. -     mktemp(temp_file);
  729.       return 0;
  730.   }
  731.   
  732.   /*
  733. --- 146,165 ----
  734.       mkdir(nn_directory, 0755);    /* should check here */
  735.       }
  736.       
  737.       return 0;
  738. + }
  739. + new_temp_file()
  740. + {
  741. +     static char buf[FILENAME];
  742. +     static char *temp_dir = NULL;
  743. +     
  744. +     if (temp_dir == NULL && (temp_dir = getenv("TMPDIR")) == NULL) 
  745. +     temp_dir = TMP_DIRECTORY;
  746. +     sprintf(buf, "%s/nn.XXXXXX", temp_dir);
  747. +     mktemp(buf);
  748. +     temp_file = buf;
  749.   }
  750.   
  751.   /*
  752.  
  753. *** /usr/storm/nn6.3.7/init.c    Fri Sep  8 12:46:44 1989
  754. --- init.c    Wed Oct 18 21:30:21 1989
  755. ***************
  756. *** 935,940 ****
  757. --- 935,947 ----
  758.           if (terminal_speed <= (slow_speed / 10)) goto skip_to_end;
  759.           break;
  760.       }
  761. +     CASE( "term" ) {
  762. +         extern char *term_name;
  763. +         if (argv(2) == NULL || strcmp(argv(2), term_name)) goto skip_to_end;
  764. +         break;
  765. +     }
  766.       
  767.       goto on_err;
  768.       }
  769.  
  770. *** /usr/storm/nn6.3.7/keymap.c    Fri Sep  8 12:46:45 1989
  771. --- keymap.c    Wed Oct 18 21:23:45 1989
  772. ***************
  773. *** 65,71 ****
  774.   /* ACK ^F */    K_UNBOUND, 
  775.   /* BEL ^G */        K_INVALID, 
  776.   /* BS  ^H */        K_PREV_PAGE, 
  777. ! /* TAB ^I */    K_UNBOUND, 
  778.   /* NL  ^J */        K_NEXT_LINE, 
  779.   /* VT  ^K */    K_UNBOUND, 
  780.   /* FF  ^L */        K_REDRAW, 
  781. --- 65,71 ----
  782.   /* ACK ^F */    K_UNBOUND, 
  783.   /* BEL ^G */        K_INVALID, 
  784.   /* BS  ^H */        K_PREV_PAGE, 
  785. ! /* TAB ^I */        K_SKIP_LINES, 
  786.   /* NL  ^J */        K_NEXT_LINE, 
  787.   /* VT  ^K */    K_UNBOUND, 
  788.   /* FF  ^L */        K_REDRAW, 
  789. ***************
  790. *** 485,490 ****
  791. --- 485,491 ----
  792.       "select-range",        K_SELECT_RANGE,        K_ONLY_MENU,
  793.       "select-subject",        K_SELECT_SUBJECT,    0,
  794.       "shell",            K_SHELL,        0,
  795. +     "skip-lines",        K_SKIP_LINES,        0,
  796.   
  797.       "unselect-all",        K_UNSELECT_ALL,        K_ONLY_MENU,
  798.       "unshar",            K_UNSHAR,        0,
  799.  
  800. *** /usr/storm/nn6.3.7/keymap.h    Fri Sep  8 12:46:45 1989
  801. --- keymap.h    Wed Oct 18 20:36:56 1989
  802. ***************
  803. *** 43,48 ****
  804. --- 43,49 ----
  805.   
  806.       /* scrolling/menu movement */
  807.   
  808. + #define K_SKIP_LINES        0x0023 /* skip lines of same type    */
  809.   #define K_NEXT_PAGE        0x0024 /* next page             */
  810.   #define K_NEXT_HALF_PAGE     0x0025 /* next half page        */
  811.   #define K_NEXT_LINE        0x0026 /* next line            */
  812.  
  813. *** /usr/storm/nn6.3.7/kill.c    Fri Sep  8 12:46:45 1989
  814. --- kill.c    Wed Oct 18 18:00:29 1989
  815. ***************
  816. *** 495,500 ****
  817. --- 495,501 ----
  818.       compf = open_file(relative(nn_directory, COMPILED_KILL), OPEN_CREATE);
  819.       if (compf == NULL) goto err1;
  820.   
  821. +     new_temp_file();
  822.       if ((patternf = open_file(temp_file, OPEN_CREATE)) == NULL)
  823.       goto err2;
  824.   
  825.  
  826. *** /usr/storm/nn6.3.7/menu.c    Fri Sep  8 12:46:47 1989
  827. --- menu.c    Fri Oct 20 18:13:23 1989
  828. ***************
  829. *** 19,24 ****
  830. --- 19,25 ----
  831.   export int  slow_mode       = 0;    /* mark selected articles with *s */
  832.   export int  re_layout      = 0; /* Re: format presentation on menus */
  833.   export int  collapse_subject = 25; /* collapse long subjects at position */
  834. + export int  conf_group_entry  = 0;    /* ask whether group should be entered */
  835.   
  836.   export char *delayed_msg = NULL;    /* give to msg() after redraw */
  837.   export long dl_msg_arg = 0;        /* optional arg to delayed_msg */
  838. ***************
  839. *** 346,351 ****
  840. --- 347,353 ----
  841.       extern int         enable_stop, file_completion();
  842.       extern int        alt_cmd_key, in_menu_mode, any_message;
  843.       article_number    elim_list[3];
  844. +     int            entry_check = conf_group_entry;
  845.       
  846.   #define    menu_return(cmd) \
  847.       { menu_cmd = (cmd); goto menu_exit; }
  848. ***************
  849. *** 433,438 ****
  850. --- 435,457 ----
  851.           
  852.           REDRAW_CHECK;
  853.       
  854. +         if (entry_check && menu_level == 1 && 
  855. +         (current_group->group_flag & G_READ) == 0) {
  856. +         entry_check = 0;
  857. +         prompt_line = firstl;
  858. +         prompt("\1Enter?\1 ");
  859. +         if ((temp = yes(0)) == 0) menu_return(ME_NEXT);
  860. +         if (temp < 0) {
  861. +             prompt("\1Mark as read?\1 ");
  862. +             if ((temp = yes(0)) > 0) menu_return(ME_READ);
  863. +             if (temp < 0) menu_return(ME_QUIT);
  864. +             menu_return(ME_NEXT);
  865. +         }
  866. +         
  867. +         gotoxy(0, firstl);
  868. +         clrline();
  869. +         }
  870. +         
  871.           how = INIT;
  872.           mark(); /* fl; */
  873.           
  874. ***************
  875. *** 1133,1139 ****
  876.   
  877.   static show_articles()
  878.   {
  879. !     register article_number cur, next;
  880.       register article_header *ah;
  881.       article_number elim_list[1];
  882.       register int mode;
  883. --- 1152,1158 ----
  884.   
  885.   static show_articles()
  886.   {
  887. !     register article_number cur, next, temp;
  888.       register article_header *ah;
  889.       article_number elim_list[1];
  890.       register int mode;
  891. ***************
  892. *** 1170,1185 ****
  893.               elim_list[0] = next;
  894.               elim_articles(elim_list, 1);
  895.               cur = elim_list[0];
  896. !             if (cur <= 0) cur = n_articles;
  897.               continue;
  898.           }
  899.           break;
  900.           
  901.            case MC_DO_SELECT:
  902. !         for (next = cur+1, cur = -1; next < n_articles; next++) {
  903. !             if (auto_select_article(ah = articles[next], 2)) 
  904.               ah->flag |= A_SELECT;
  905. !             if (cur < 0 && ah->flag & A_SELECT) cur = next;
  906.           }
  907.           continue;
  908.           
  909. --- 1189,1205 ----
  910.               elim_list[0] = next;
  911.               elim_articles(elim_list, 1);
  912.               cur = elim_list[0];
  913. !             if (cur < 0) cur = n_articles;
  914.               continue;
  915.           }
  916.           break;
  917.           
  918.            case MC_DO_SELECT:
  919. !         for (temp = cur+1, cur = next; temp < n_articles; temp++) {
  920. !             if (auto_select_article(ah = articles[temp], 2)) {
  921.               ah->flag |= A_SELECT;
  922. !             if (temp < cur) cur = temp;
  923. !             }
  924.           }
  925.           continue;
  926.           
  927.  
  928. *** /usr/storm/nn6.3.7/mk_online_man    Fri Sep  8 12:46:48 1989
  929. --- mk_online_man    Thu Oct 19 17:25:03 1989
  930. ***************
  931. *** 3,15 ****
  932.   sed     -e 's/\\f[BPI]//g' \
  933.       -e 's/\\-/-/g' \
  934.       -e 's/\\&//' \
  935. !     -e '/^\.\\"/d' \
  936.       -e '/^\.nf/d' \
  937.       -e '/^\.fi/d' \
  938.       -e '/^\.if/d' \
  939. -     -e '/^\.DT/d' \
  940.       -e '/^\.ta/d' \
  941.       -e '/^\.nr/d' \
  942.       -e 's/^\.[BI] //' "$@" |
  943.   awk '
  944.   BEGIN {
  945. --- 3,15 ----
  946.   sed     -e 's/\\f[BPI]//g' \
  947.       -e 's/\\-/-/g' \
  948.       -e 's/\\&//' \
  949. !     -e '/^\.\\" /d' \
  950.       -e '/^\.nf/d' \
  951.       -e '/^\.fi/d' \
  952.       -e '/^\.if/d' \
  953.       -e '/^\.ta/d' \
  954.       -e '/^\.nr/d' \
  955. +     -e '/^\.in/d' \
  956.       -e 's/^\.[BI] //' "$@" |
  957.   awk '
  958.   BEGIN {
  959. ***************
  960. *** 18,23 ****
  961. --- 18,25 ----
  962.       m=72
  963.       a=0
  964.       h=""
  965. +     t=0
  966. +     tab=sprintf("%c",9)
  967.   }
  968.   /^\.SH / {
  969.       if (a) printf("%s\n\n", l)
  970. ***************
  971. *** 72,77 ****
  972. --- 74,107 ----
  973.       } else while (length(l) < 4) l=l " "
  974.       next
  975.   }
  976. + /^\.\\"ta/ {
  977. +     for (t=2; t <= NF; t++) to[t-1] = $t
  978. +     t=NF
  979. +     next
  980. + }
  981. + /^\.DT/ {
  982. +     t=0
  983. +     next
  984. + }
  985. + t != 0 {
  986. +     j=length($0)
  987. +     k=0; g=1
  988. +     for (i=1; i<=j; i++) {
  989. +         while (k < to[g]) {
  990. +             printf(" ")
  991. +             k++
  992. +         }
  993. +         c=substr($0,i,1)
  994. +         if (c == tab) {
  995. +             g++
  996. +         } else {
  997. +             printf("%s", c)
  998. +             k++
  999. +         }
  1000. +     }
  1001. +     printf("\n")
  1002. +     next
  1003. + }    
  1004.   {
  1005.       s=1
  1006.       p=" "
  1007.  
  1008. *** /usr/storm/nn6.3.7/more.c    Fri Sep  8 12:46:48 1989
  1009. --- more.c    Wed Oct 18 20:47:31 1989
  1010. ***************
  1011. *** 112,118 ****
  1012.       int form_feed, last_ff_line, ignore_nl;
  1013.       off_t firstl, lastl;
  1014.       off_t linepos[LINEMAX];
  1015. !     char linebuf[200], *lp;
  1016.       int linenum, maxline, topline, print_lines, lno1;
  1017.       int underline_line, fake_underline;
  1018.       int match_lines, match_redraw, match_topline, match_botline;
  1019. --- 112,122 ----
  1020.       int form_feed, last_ff_line, ignore_nl;
  1021.       off_t firstl, lastl;
  1022.       off_t linepos[LINEMAX];
  1023. !     char linebuf[200], *lp, skip_char;
  1024. !     int skip_wrap;
  1025. ! #ifndef LIMITED_STACK
  1026. !     news_header_buffer ngheader, dgheader;
  1027. ! #endif
  1028.       int linenum, maxline, topline, print_lines, lno1;
  1029.       int underline_line, fake_underline;
  1030.       int match_lines, match_redraw, match_topline, match_botline;
  1031. ***************
  1032. *** 149,155 ****
  1033. --- 153,163 ----
  1034.       
  1035.       /* temporary use of linepos array as header buffers... */
  1036.   
  1037. + #ifdef LIMITED_STACK
  1038.       art = open_news_article(ah, open_modes, (char *)&linepos[100], (char *)&linepos[LINEMAX/2]);
  1039. + #else
  1040. +     art = open_news_article(ah, open_modes, ngheader, dgheader);
  1041. + #endif
  1042.   
  1043.       if (art == NULL) {
  1044.       msg("Expired: \"%s: %-.50s\"", ah->sender, ah->subject);
  1045. ***************
  1046. *** 193,198 ****
  1047. --- 201,207 ----
  1048.       rot13 = 0;
  1049.       compress_space = compress_mode;
  1050.       last_ff_line = goto_line = -1, prev_goto = 1;
  1051. +     skip_char = NUL; skip_wrap = 0;
  1052.       match_lines = match_redraw = match_expr = 0;
  1053.       underline_line = -1;
  1054.       fake_underline = 0;
  1055. ***************
  1056. *** 227,232 ****
  1057. --- 236,246 ----
  1058.       } else
  1059.           clrdisp();
  1060.   
  1061. + #ifndef LIMITED_STACK
  1062. +     if (linenum == 1)
  1063. +         hdrline = screen_offset == 0 ? header_lines : "";
  1064. + #endif
  1065.         print_header:
  1066.       if (hdrline == NULL || *hdrline == '*') {
  1067.           if (hdrline && *++hdrline == NUL) hdrline = NULL;
  1068. ***************
  1069. *** 471,477 ****
  1070.        case '\f':
  1071.           last_ff_line = linenum;
  1072.           if (lp == linebuf) {
  1073. !         if (goto_line > 0 || match_expr || lno == lno1) goto next_line;
  1074.           form_feed = 1;
  1075.           goto Prompt;
  1076.           }
  1077. --- 485,492 ----
  1078.        case '\f':
  1079.           last_ff_line = linenum;
  1080.           if (lp == linebuf) {
  1081. !         if (goto_line > 0 || skip_char || match_expr || lno == lno1)
  1082. !             goto next_line;
  1083.           form_feed = 1;
  1084.           goto Prompt;
  1085.           }
  1086. ***************
  1087. *** 536,543 ****
  1088.       
  1089.    end_line:
  1090.       /* if we are seaching for a specific line, repeat until it is found */
  1091.       if (goto_line >= linenum) goto next_line;
  1092.       *lp++ = NUL;
  1093.   
  1094.       if (match_expr) {
  1095. --- 551,569 ----
  1096.       
  1097.    end_line:
  1098.       /* if we are seaching for a specific line, repeat until it is found */
  1099. +     if (skip_wrap) {
  1100. +     skip_wrap = ignore_nl;
  1101. +     goto next_line;
  1102. +     }
  1103.       if (goto_line >= linenum) goto next_line;
  1104. !     if (skip_char) {
  1105. !     if (lp == linebuf || linebuf[0] == skip_char) {
  1106. !         skip_wrap = ignore_nl;
  1107. !         goto next_line;
  1108. !     }
  1109. !     skip_char = NUL;
  1110. !     }
  1111. !     
  1112.       *lp++ = NUL;
  1113.   
  1114.       if (match_expr) {
  1115. ***************
  1116. *** 638,643 ****
  1117. --- 664,671 ----
  1118.       match_redraw = 0;
  1119.   
  1120.    Prompt:
  1121. +     if (eof && lno == screen_offset) more_return(MC_NEXT);
  1122.       
  1123.       raw();
  1124.    
  1125. ***************
  1126. *** 890,895 ****
  1127. --- 918,927 ----
  1128.       linenum = topline - window_lines + overlap; /* not perfect after FF */
  1129.       underline_line = topline;
  1130.       if (linenum < 1) linenum = 1;
  1131. +     goto next_page;
  1132. +      case K_SKIP_LINES:
  1133. +     skip_char = linebuf[0];
  1134.       goto next_page;
  1135.       
  1136.        case K_GOTO_LINE:
  1137.  
  1138. *** /usr/storm/nn6.3.7/news.c    Fri Sep  8 12:46:48 1989
  1139. --- news.c    Wed Oct 18 19:37:08 1989
  1140. ***************
  1141. *** 151,157 ****
  1142.           while (*bp && *bp != ':' && isascii(*bp) && !isspace(*bp))
  1143.               bp++;
  1144.           bp++;
  1145. !         while (*bp && isascii(*bp) && isspace(*bp)) bp++;
  1146.           *fptr = bp;
  1147.           }
  1148.       while (*bp && *bp != NL) bp++;
  1149. --- 151,157 ----
  1150.           while (*bp && *bp != ':' && isascii(*bp) && !isspace(*bp))
  1151.               bp++;
  1152.           bp++;
  1153. !         while (*bp && isascii(*bp) && isspace(*bp) && *bp != NL) bp++;
  1154.           *fptr = bp;
  1155.           }
  1156.       while (*bp && *bp != NL) bp++;
  1157.  
  1158. *** /usr/storm/nn6.3.7/nn.1    Fri Sep  8 12:46:50 1989
  1159. --- nn.1    Fri Oct 20 23:22:52 1989
  1160. ***************
  1161. *** 520,525 ****
  1162. --- 520,530 ----
  1163.   .I one\ line\ forward
  1164.   in the article.
  1165.   .TP
  1166. + \&\fBtab\fP    {\fBskip-lines\fP}
  1167. + Skip over lines starting with the same character as the last line on
  1168. + the current page.  This is useful to skip over included text or to the
  1169. + next file in a shell archive.
  1170. + .TP
  1171.   \&\fB^\fP    {\fBpage=1\fP}
  1172.   Goto the first page (excluding the header) of the article.
  1173.   .TP
  1174. ***************
  1175. *** 789,795 ****
  1176.   .TP
  1177.   \&\fB:patch\fP    {\fBpatch\fP} 
  1178.   Send articles through \fBpatch\fP(1) (or the program defined in the
  1179. ! \fBpatch-cmd\fP variable).  Instead of a file name, you will be
  1180.   prompted for the name of a directory in which you want the patch
  1181.   command to be executed.  \fInn\fP will then pipe the body of the
  1182.   article through the patch command. 
  1183. --- 794,800 ----
  1184.   .TP
  1185.   \&\fB:patch\fP    {\fBpatch\fP} 
  1186.   Send articles through \fBpatch\fP(1) (or the program defined in the
  1187. ! \fBpatch-command\fP variable).  Instead of a file name, you will be
  1188.   prompted for the name of a directory in which you want the patch
  1189.   command to be executed.  \fInn\fP will then pipe the body of the
  1190.   article through the patch command. 
  1191. ***************
  1192. *** 1771,1776 ****
  1193. --- 1776,1793 ----
  1194.   the `N' {\fBnext-group\fP} command.  But it will not look for new
  1195.   articles arrived since the invokation of \fInn\fP.
  1196.   .TP
  1197. + \fBconfirm-entry\fP        (boolean, default false)
  1198. + When set, \fInn\fP will ask for confirmation before entering a group
  1199. + with unread articles.  It is useful on slow terminals if you don't
  1200. + want to wait until \fInn\fP has drawn the first menu to be able to
  1201. + skip the group.
  1202. +   Answering no to the "Enter?" prompt will cause \fInn\fP to skip to
  1203. + the next group without marking the current group as read.  If you
  1204. + answer by hitting \fBinterrupt\fP, \fInn\fP will ask the question
  1205. + "Mark as read?" which allows you to mark the current group as read
  1206. + before going to the next group.  If this second question is also
  1207. + answered by hitting \fBinterrupt\fP, \fInn\fP will quit immediately.
  1208. + .TP
  1209.   \fBconfirm-messages\fP        (boolean, default false)
  1210.   In some cases, \fInn\fP will sleep one second (or more) when it has shown a
  1211.   message to the user, e.g. in connection with macro debugging.  Setting
  1212. ***************
  1213. *** 1925,1930 ****
  1214. --- 1942,1952 ----
  1215.   format, i.e. you can use you favourite mailer (and \fInn\fP) to look at
  1216.   the file.
  1217.   .TP
  1218. + \fBmail-script\fP \fIfile\fP    (string, default not set)
  1219. + When set, \fInn\fP will use the specified file instead of the standard
  1220. + \fIaux\fP script when executing the \fBreply\fP and \fBmail\fP
  1221. + commands.
  1222. + .TP
  1223.   \fBmark-overlap\fP    (boolean, default false)
  1224.   When set, \fInn\fP will draw a line (using the underline capabilities
  1225.   of the terminal if possible) to indicate the end of the overlap (see the
  1226. ***************
  1227. *** 1954,1959 ****
  1228. --- 1976,1986 ----
  1229.   Save file for follow-ups and postings.  Same rules and format as the
  1230.   \fBmail-record\fP variable.
  1231.   .TP
  1232. + \fBnews-script\fP \fIfile\fP    (string, default not set)
  1233. + When set, \fInn\fP will use the specified file instead of the standard
  1234. + \fIaux\fP script when executing the \fBfollow\fP and \fBpost\fP
  1235. + commands.
  1236. + .TP
  1237.   \fBnewsrc\fP        (boolean, default false)
  1238.   When set, \fInn\fP will synchronize its own
  1239.   .I rc
  1240. ***************
  1241. *** 1987,1993 ****
  1242.   is piped through as well as most of the output from
  1243.   .IR nnadmin (1M).
  1244.   .TP
  1245. ! \fBpatch-cmd\fP \fIshell-command\fP    (string, default "patch")
  1246.   This is the command which is invoked by the \fBpatch\fP command.
  1247.   .TP
  1248.   \fBprinter\fP \fIshell-command\fP    (string, default is system dep.)
  1249. --- 2014,2020 ----
  1250.   is piped through as well as most of the output from
  1251.   .IR nnadmin (1M).
  1252.   .TP
  1253. ! \fBpatch-command\fP \fIshell-command\fP    (string, default "patch")
  1254.   This is the command which is invoked by the \fBpatch\fP command.
  1255.   .TP
  1256.   \fBprinter\fP \fIshell-command\fP    (string, default is system dep.)
  1257. ***************
  1258. *** 2045,2050 ****
  1259. --- 2072,2082 ----
  1260.   .B S*
  1261.   command).
  1262.   .TP
  1263. + \fBshell-restrictions\fP    (boolean, default false)
  1264. + When set (in the init file), \fInn\fP will not allow the user to
  1265. + invoke the shell in any way, including saving on pipes.  It also
  1266. + prevents the user from changing certain variables containig commands.
  1267. + .TP
  1268.   \fBsilent\fP        (boolean, default false)
  1269.   When set, \fInn\fP wont print the logo or "No News" if there are no
  1270.   unread articles.  Only useful to set in the init file or with the 
  1271. ***************
  1272. *** 2099,2104 ****
  1273. --- 2131,2139 ----
  1274.   .I sysline (1)
  1275.   utility.
  1276.   .TP
  1277. + \fBunshar-command\fP \fIshell-command\fP    (string, default "/bin/sh")
  1278. + This is the command which is invoked by the \fBunshar\fP command.
  1279. + .TP
  1280.   \fBunshar-header-file\fP \fIfile\fP    (string, default "Unshar.Headers")
  1281.   The name of the file in which the header and initial text of articles
  1282.   unpacked with the \fB:unshar\fP command is saved.  Unless the file name
  1283. ***************
  1284. *** 2155,2160 ****
  1285. --- 2190,2196 ----
  1286.   .LP
  1287.   .in +8n
  1288.   .ta 5m
  1289. + .\"ta 4 9
  1290.   .br
  1291.   \fBA\fP    Approved:
  1292.   .br
  1293. ***************
  1294. *** 2477,2483 ****
  1295.   in one of the modes, that mode will contain the word \fBnix\fP.
  1296.   .LP
  1297.   .in +8n
  1298. ! .ta \w'select-subject'u+5m +\w'Selection mode'u+3m
  1299.   .br
  1300.   \fIFunction    Selection mode    Reading mode
  1301.   .br
  1302. --- 2513,2520 ----
  1303.   in one of the modes, that mode will contain the word \fBnix\fP.
  1304.   .LP
  1305.   .in +8n
  1306. ! .ta \w'select-subject'u+5m +\w'Selection_mode'u+3m
  1307. ! .\"ta 4 20 36
  1308.   .br
  1309.   \fIFunction    Selection mode    Reading mode
  1310.   .br
  1311. ***************
  1312. *** 2593,2598 ****
  1313. --- 2630,2637 ----
  1314.   .br
  1315.   \fBshell\fP    !     ! 
  1316.   .br
  1317. + \fBskip-lines\fP    \fBnix\fP     \fBtab\fP 
  1318. + .br
  1319.   \fBunselect-all\fP    ~     \fBnix\fP 
  1320.   .br
  1321.   \fBunshar\fP        
  1322. ***************
  1323. *** 2896,2901 ****
  1324. --- 2935,2941 ----
  1325.   .sp 0.5v
  1326.   .nf
  1327.       \fBon slow\fP
  1328. +         set confirm-entry
  1329.           set slow-mode
  1330.           set delay-redraw
  1331.           unset visible-bell
  1332. ***************
  1333. *** 2911,2916 ****
  1334. --- 2951,2961 ----
  1335.   Same as \fBon slow\fP except that the commands are only executed when
  1336.   the terminal is running at a speed above the \fBslow-speed\fP value.
  1337.   .TP
  1338. + \fBon term\fP \fIterm-type\fP
  1339. + .br
  1340. + The commands are executed if the TERM environment variable contains
  1341. + the value specified by \fIterm-type\fP.
  1342. + .TP
  1343.   \fBon entry\fP
  1344.   .br
  1345.   These commands (macro format!) are executed every time \fInn\fP enters a
  1346. ***************
  1347. *** 3206,3214 ****
  1348.   .SH FILES
  1349.   .DT
  1350.   .nr tW \w'~/.nn/KILL.COMP'
  1351. ! .nr tX \w'/usr/lib/terminfo/*'
  1352.   .if \n(tWu>\n(tXu .nr tX \n(tWu
  1353.   .ta \n(tWu+3m
  1354.   ~/.nn/rc    The record of read articles.
  1355.   .br
  1356.   ~/.nn/rc.bak    Copy of rc file saved on entry to \fInn\fP.
  1357. --- 3251,3260 ----
  1358.   .SH FILES
  1359.   .DT
  1360.   .nr tW \w'~/.nn/KILL.COMP'
  1361. ! .nr tX \w'/usr/lib/nntp-server'
  1362.   .if \n(tWu>\n(tXu .nr tX \n(tWu
  1363.   .ta \n(tWu+3m
  1364. + .\"ta 0 22
  1365.   ~/.nn/rc    The record of read articles.
  1366.   .br
  1367.   ~/.nn/rc.bak    Copy of rc file saved on entry to \fInn\fP.
  1368.  
  1369. *** /usr/storm/nn6.3.8/pack_name.c    Tue Oct 10 12:26:59 1989
  1370. --- pack_name.c    Thu Oct 19 09:17:13 1989
  1371. ***************
  1372. *** 447,452 ****
  1373. --- 447,456 ----
  1374.       for (p = name+1; p < q; p++) {
  1375.       if (*p == TAB) continue;
  1376.       if (*p == ' ') continue;
  1377. +     if (*p == '-' && (p + 1) < q) {
  1378. +         p++;
  1379. +         continue;
  1380. +     }
  1381.       *p = TAB;
  1382.       lname--;
  1383.       }
  1384.  
  1385. *** /usr/storm/nn6.3.7/pack_subject.c    Fri Sep  8 12:46:52 1989
  1386. --- pack_subject.c    Wed Oct 18 17:25:12 1989
  1387. ***************
  1388. *** 13,21 ****
  1389.       register char *max_dest;
  1390.       
  1391.       re = 0;
  1392.   
  1393.       if (src) {
  1394. -     start_dest = dest;
  1395.       max_dest = dest + max_length;
  1396.       
  1397.       while (*src) {
  1398. --- 13,21 ----
  1399.       register char *max_dest;
  1400.       
  1401.       re = 0;
  1402. +     start_dest = dest;
  1403.   
  1404.       if (src) {
  1405.       max_dest = dest + max_length;
  1406.       
  1407.       while (*src) {
  1408.  
  1409. *** /usr/storm/nn6.3.7/save.c    Fri Sep  8 12:46:59 1989
  1410. --- save.c    Fri Oct 20 22:42:01 1989
  1411. ***************
  1412. *** 22,32 ****
  1413.   export char *save_counter_format = "%d";    /* format of save counter */
  1414.   
  1415.   export char printer[FILENAME] = PRINTER;    /* lp -s -ol        */
  1416. ! export char *patch_cmd = "patch";
  1417.   
  1418.   extern int file_completion();
  1419.   
  1420.   import char *temp_file;
  1421.   
  1422.   static int save_mode;
  1423.   static char *unshar_cmd;
  1424. --- 22,34 ----
  1425.   export char *save_counter_format = "%d";    /* format of save counter */
  1426.   
  1427.   export char printer[FILENAME] = PRINTER;    /* lp -s -ol        */
  1428. ! export char *patch_command = "patch";
  1429. ! export char *unshar_command = SHELL;
  1430.   
  1431.   extern int file_completion();
  1432.   
  1433.   import char *temp_file;
  1434. + import int  shell_restrictions;
  1435.   
  1436.   static int save_mode;
  1437.   static char *unshar_cmd;
  1438. ***************
  1439. *** 122,127 ****
  1440. --- 124,133 ----
  1441.       }
  1442.       
  1443.       if (*save_name == '|') {
  1444. +         if (shell_restrictions) {
  1445. +         msg("Restricted operation - pipes not allowed");
  1446. +         return NULL;
  1447. +         }
  1448.           mode_text = "Pipe";
  1449.           save_name++;
  1450.           save_mode |= IS_PIPE;
  1451. ***************
  1452. *** 155,167 ****
  1453.        case K_PATCH:
  1454.       save_mode = NO_HEADER | SEPARATE_FILES | DO_UNSHAR | DO_PATCH;
  1455.       mode_text = "Patch";
  1456. !     unshar_cmd = patch_cmd;
  1457.       goto patch1;
  1458.       
  1459.        case K_UNSHAR:
  1460.       save_mode = NO_HEADER | SEPARATE_FILES | DO_UNSHAR;
  1461.       mode_text = "Unshar";
  1462. !     unshar_cmd = SHELL;
  1463.       
  1464.        patch1:
  1465.       prompt("\1%s Directory:\1 ", mode_text);
  1466. --- 161,173 ----
  1467.        case K_PATCH:
  1468.       save_mode = NO_HEADER | SEPARATE_FILES | DO_UNSHAR | DO_PATCH;
  1469.       mode_text = "Patch";
  1470. !     unshar_cmd = patch_command;
  1471.       goto patch1;
  1472.       
  1473.        case K_UNSHAR:
  1474.       save_mode = NO_HEADER | SEPARATE_FILES | DO_UNSHAR;
  1475.       mode_text = "Unshar";
  1476. !     unshar_cmd = unshar_command;
  1477.       
  1478.        patch1:
  1479.       prompt("\1%s Directory:\1 ", mode_text);
  1480. ***************
  1481. *** 174,184 ****
  1482.   
  1483.       save_mode = SHORT_HEADER | IS_PIPE;
  1484.   
  1485. !     prompt("\1Print command:\1 ");
  1486. !     save_name = get_s(NONE, printer, NONE, NO_COMPLETION);
  1487. !     if (save_name == NULL || *save_name == NUL) return NULL;
  1488. !     strcpy(printer, save_name);
  1489.       mode_text = "Print";
  1490.       break;
  1491.   
  1492. --- 180,193 ----
  1493.   
  1494.       save_mode = SHORT_HEADER | IS_PIPE;
  1495.   
  1496. !     if (shell_restrictions) {
  1497. !         save_name = printer;
  1498. !     } else {
  1499. !         prompt("\1Print command:\1 ");
  1500. !         save_name = get_s(NONE, printer, NONE, NO_COMPLETION);
  1501. !         if (save_name == NULL || *save_name == NUL) return NULL;
  1502. !         strcpy(printer, save_name);
  1503. !     }
  1504.       mode_text = "Print";
  1505.       break;
  1506.   
  1507. ***************
  1508. *** 347,352 ****
  1509. --- 356,362 ----
  1510.           else
  1511.           sprintf(copybuf, "%s %s", unshar_cmd, pager_redir);
  1512.   #else
  1513. +         new_temp_file();
  1514.           sprintf(copybuf, 
  1515.               "cd %s && { %s 2>&1 ; } | tee %s ; cat %s >> %s.Result ; rm %s",
  1516.               save_name != NULL ? save_name : ".", unshar_cmd,
  1517. ***************
  1518. *** 515,522 ****
  1519.       }
  1520.       fseek(h, (off_t)0, 2);
  1521.       if (!use_mmdf_folders && ftell(h) > 0) putc(NL, h);  /* just in case */
  1522. !     mailbox_format(f, 1);
  1523. !     endpos = ftell(f);
  1524.       fseek(f, ah->hpos, 0);
  1525.       while (--endpos >= 0 && (c = getc(f)) != EOF) 
  1526.       putc(c, h);
  1527. --- 525,532 ----
  1528.       }
  1529.       fseek(h, (off_t)0, 2);
  1530.       if (!use_mmdf_folders && ftell(h) > 0) putc(NL, h);  /* just in case */
  1531. !     mailbox_format(h, 1);
  1532. !     endpos = ftell(f) - ah->hpos;
  1533.       fseek(f, ah->hpos, 0);
  1534.       while (--endpos >= 0 && (c = getc(f)) != EOF) 
  1535.       putc(c, h);
  1536.  
  1537. *** /usr/storm/nn6.3.7/term.c    Fri Sep  8 12:46:59 1989
  1538. --- term.c    Wed Oct 18 21:53:21 1989
  1539. ***************
  1540. *** 1142,1148 ****
  1541.       if (!is_raw) {
  1542.           raw();
  1543.           c = get_c();
  1544. !         no_raw();
  1545.       } else
  1546.           c = get_c();
  1547.   
  1548. --- 1142,1148 ----
  1549.       if (!is_raw) {
  1550.           raw();
  1551.           c = get_c();
  1552. !         unset_raw();
  1553.       } else
  1554.           c = get_c();
  1555.   
  1556. ***************
  1557. *** 1189,1195 ****
  1558.   {
  1559.       FILE *f;
  1560.       register c, stand_on;
  1561. !     int was_raw, linecnt, headln_cnt, hdline, no_conf;
  1562.       char headline[128];
  1563.       
  1564.       headline[0] = 0;
  1565. --- 1189,1195 ----
  1566.   {
  1567.       FILE *f;
  1568.       register c, stand_on;
  1569. !     int linecnt, headln_cnt, hdline, no_conf;
  1570.       char headline[128];
  1571.       
  1572.       headline[0] = 0;
  1573. ***************
  1574. *** 1198,1207 ****
  1575.       
  1576.       headln_cnt = -1;
  1577.       
  1578. -     was_raw = is_raw;
  1579. -     no_raw();
  1580.       if (modes & CLEAR_DISPLAY) {
  1581.       gotoxy(0,0);
  1582.       clrdisp();
  1583. --- 1198,1203 ----
  1584. ***************
  1585. *** 1251,1256 ****
  1586. --- 1247,1253 ----
  1587.   
  1588.           if (hdline) {
  1589.           puts(headline);
  1590. +         putchar(CR);
  1591.           hdline = 0;
  1592.           linecnt--;
  1593.           }
  1594. ***************
  1595. *** 1257,1262 ****
  1596. --- 1254,1260 ----
  1597.           
  1598.           putchar(c);
  1599.           if (c == NL) {
  1600. +         putchar(CR);
  1601.           if (headln_cnt >= 0) {
  1602.               headline[--headln_cnt] = 0;
  1603.               headln_cnt = -1;
  1604. ***************
  1605. *** 1279,1286 ****
  1606.       fclose(f);
  1607.       }
  1608.   
  1609. -     if (was_raw) raw();
  1610.       prompt_line = Lines-1;    /* move prompt to last line */
  1611.       
  1612.       if (!no_conf && (modes & CONFIRMATION)) 
  1613. --- 1277,1282 ----
  1614. ***************
  1615. *** 1295,1301 ****
  1616.       char *fmt;
  1617.       va_list ap;
  1618.       
  1619. !     no_raw();
  1620.       clrdisp();
  1621.       fl;
  1622.   
  1623. --- 1291,1297 ----
  1624.       char *fmt;
  1625.       va_list ap;
  1626.       
  1627. !     unset_raw();
  1628.       clrdisp();
  1629.       fl;
  1630.   
  1631. ***************
  1632. *** 1396,1402 ****
  1633.       if (fmt != P_REDRAW && fmt != P_RESTORE) 
  1634.       vsprintf(cur_p, fmt, va_args2toN);
  1635.   
  1636. !     putchar('\r');
  1637.       
  1638.       for (cp = cur_p, stand_on = 0, prompt_length = 0; *cp; cp++) {
  1639.       if (*cp == '\1') {
  1640. --- 1392,1398 ----
  1641.       if (fmt != P_REDRAW && fmt != P_RESTORE) 
  1642.       vsprintf(cur_p, fmt, va_args2toN);
  1643.   
  1644. !     putchar(CR);
  1645.       
  1646.       for (cp = cur_p, stand_on = 0, prompt_length = 0; *cp; cp++) {
  1647.       if (*cp == '\1') {
  1648. ***************
  1649. *** 1478,1484 ****
  1650.       c = get_c();
  1651.       do_macro_processing = dmp;
  1652.   
  1653. !     if (!was_raw) no_raw();
  1654.       
  1655.       return c;
  1656.   }
  1657. --- 1474,1480 ----
  1658.       c = get_c();
  1659.       do_macro_processing = dmp;
  1660.   
  1661. !     if (!was_raw) unset_raw();
  1662.       
  1663.       return c;
  1664.   }
  1665. ***************
  1666. *** 1494,1499 ****
  1667. --- 1490,1506 ----
  1668.       pg_quit = pg_col = 0;
  1669.       pg_width = Columns / cols;
  1670.       pg_maxw = pg_width * (cols - 1);
  1671. + }
  1672. + pg_scroll(n)
  1673. + int n;
  1674. + {
  1675. +     pg_line += n;
  1676. +     if (pg_line >= (Lines - 1)) {
  1677. +     pg_line = 0;
  1678. +     return any_key(0) == K_interrupt;
  1679. +     }
  1680. +     return 0;
  1681.   }
  1682.   
  1683.   pg_next()
  1684.  
  1685. *** /usr/storm/nn6.3.7/variable.c    Fri Sep  8 12:47:00 1989
  1686. --- variable.c    Fri Oct 20 22:55:08 1989
  1687. ***************
  1688. *** 17,27 ****
  1689.       included_mark[],
  1690.       *mail_box,
  1691.       *mail_record,
  1692.       *news_record,
  1693.       *pager,
  1694. !     *patch_cmd,
  1695.       printer[],
  1696.       *save_counter_format,
  1697.       *unshar_header_file;
  1698.   
  1699.   import int            /* boolean variables */
  1700. --- 17,30 ----
  1701.       included_mark[],
  1702.       *mail_box,
  1703.       *mail_record,
  1704. +     *mail_script,
  1705.       *news_record,
  1706. +     *news_script,
  1707.       *pager,
  1708. !     *patch_command,
  1709.       printer[],
  1710.       *save_counter_format,
  1711. +     *unshar_command,
  1712.       *unshar_header_file;
  1713.   
  1714.   import int            /* boolean variables */
  1715. ***************
  1716. *** 31,36 ****
  1717. --- 34,40 ----
  1718.       conf_append,
  1719.       conf_auto_quit,
  1720.       conf_dont_sleep,
  1721. +     conf_group_entry,
  1722.       delay_redraw,
  1723.       do_kill_handling,
  1724.       dont_sort_articles,
  1725. ***************
  1726. *** 49,54 ****
  1727. --- 53,59 ----
  1728.       quick_save,
  1729.       save_report,
  1730.       seq_cross_filtering,
  1731. +     shell_restrictions,
  1732.       show_article_date,
  1733.       show_current_time,
  1734.       silent,
  1735. ***************
  1736. *** 89,94 ****
  1737. --- 94,102 ----
  1738.   #define V_KEY        3
  1739.   #define    V_SPECIAL    4
  1740.   
  1741. + #define V_SAFE        0x80
  1742. + #define V_INIT        0x40
  1743.   struct variable_defs {
  1744.       char *var_name;
  1745.       char var_type;
  1746. ***************
  1747. *** 95,102 ****
  1748.       char var_op;
  1749.       char **var_addr;
  1750.   } variables[] = {
  1751. !     "also-subgroups",    V_BOOLEAN,    3,    (char **)&also_subgroups,
  1752. !     "backup",        V_BOOLEAN,    3,    (char **)&keep_rc_backup,
  1753.       "collapse-subject",    V_INTEGER,    3,    (char **)&collapse_subject,
  1754.       "columns",        V_INTEGER,    1,    (char **)&Columns,
  1755.       "comp1_key",    V_KEY,        0,    (char **)&comp1_key,
  1756. --- 103,110 ----
  1757.       char var_op;
  1758.       char **var_addr;
  1759.   } variables[] = {
  1760. !     "also-subgroups",    V_BOOLEAN | V_INIT, 0,    (char **)&also_subgroups,
  1761. !     "backup",        V_BOOLEAN | V_INIT, 0,    (char **)&keep_rc_backup,
  1762.       "collapse-subject",    V_INTEGER,    3,    (char **)&collapse_subject,
  1763.       "columns",        V_INTEGER,    1,    (char **)&Columns,
  1764.       "comp1_key",    V_KEY,        0,    (char **)&comp1_key,
  1765. ***************
  1766. *** 104,109 ****
  1767. --- 112,118 ----
  1768.       "compress",        V_BOOLEAN,    0,    (char **)&compress_mode,
  1769.       "confirm-append",    V_BOOLEAN,    0,    (char **)&conf_append,
  1770.       "confirm-auto-quit",V_BOOLEAN,    0,    (char **)&conf_auto_quit,
  1771. +     "confirm-entry",    V_BOOLEAN,    0,    (char **)&conf_group_entry,
  1772.       "confirm-messages",    V_BOOLEAN,    0,    (char **)&conf_dont_sleep,
  1773.       "cross-filter-seq",    V_BOOLEAN,    0,    (char **)&seq_cross_filtering,
  1774.       "cross-post",    V_BOOLEAN,    0,    (char **)&also_cross_postings,
  1775. ***************
  1776. *** 133,138 ****
  1777. --- 142,148 ----
  1778.       "mail-format",    V_BOOLEAN,    0,    (char **)&use_mail_folders,
  1779.       "mail-header",    V_STRING,    0,    (char **)&extra_mail_headers,
  1780.       "mail-record",    V_STRING,    2,    (char **)&mail_record,
  1781. +     "mail-script",    V_STRING | V_SAFE, 2,    (char **)&mail_script,
  1782.       "mark-overlap",    V_BOOLEAN,    0,    (char **)&mark_overlap,
  1783.       "min-window",    V_INTEGER,    1,    (char **)&min_pv_window,
  1784.       "mmdf-format",    V_BOOLEAN,    0,    (char **)&use_mmdf_folders,
  1785. ***************
  1786. *** 139,151 ****
  1787.       "monitor",        V_BOOLEAN,    0,    (char **)&monitor_mode,
  1788.       "news-header",    V_STRING,    0,    (char **)&extra_news_headers,
  1789.       "news-record",    V_STRING,    2,    (char **)&news_record,
  1790.       "newsrc",        V_BOOLEAN,    0,    (char **)&use_newsrc,
  1791.       "nn-re-style",    V_BOOLEAN,    0,    (char **)&nn_re_style,
  1792.       "old",        V_SPECIAL,    2,    (char **)NULL,
  1793.       "overlap",        V_INTEGER,    0,    (char **)&overlap,
  1794. !     "pager",        V_STRING,    3,    (char **)&pager,
  1795. !     "patch-cmd",    V_STRING,    3,    (char **)&patch_cmd,
  1796. !     "printer",        V_STRING,    1,    (char **)printer,
  1797.       "quick-save",    V_BOOLEAN,    0,    (char **)&quick_save,
  1798.       "re-layout",    V_INTEGER,    0,    (char **)&re_layout,
  1799.       "record",        V_SPECIAL,    1,    (char **)NULL,
  1800. --- 149,162 ----
  1801.       "monitor",        V_BOOLEAN,    0,    (char **)&monitor_mode,
  1802.       "news-header",    V_STRING,    0,    (char **)&extra_news_headers,
  1803.       "news-record",    V_STRING,    2,    (char **)&news_record,
  1804. +     "news-script",    V_STRING | V_SAFE, 2,    (char **)&news_script,
  1805.       "newsrc",        V_BOOLEAN,    0,    (char **)&use_newsrc,
  1806.       "nn-re-style",    V_BOOLEAN,    0,    (char **)&nn_re_style,
  1807.       "old",        V_SPECIAL,    2,    (char **)NULL,
  1808.       "overlap",        V_INTEGER,    0,    (char **)&overlap,
  1809. !     "pager",        V_STRING | V_SAFE, 3,    (char **)&pager,
  1810. !     "patch-command",    V_STRING | V_SAFE, 3,    (char **)&patch_command,
  1811. !     "printer",        V_STRING | V_SAFE, 1,    (char **)printer,
  1812.       "quick-save",    V_BOOLEAN,    0,    (char **)&quick_save,
  1813.       "re-layout",    V_INTEGER,    0,    (char **)&re_layout,
  1814.       "record",        V_SPECIAL,    1,    (char **)NULL,
  1815. ***************
  1816. *** 153,158 ****
  1817. --- 164,170 ----
  1818.       "retry-on-error",    V_INTEGER,    0,    (char **)&retry_on_error,
  1819.       "save-counter",    V_STRING,    3,    (char **)&save_counter_format,
  1820.       "save-report",    V_BOOLEAN,    0,    (char **)&save_report,
  1821. +     "shell-restrictions", V_BOOLEAN|V_INIT, 0,    (char **)&shell_restrictions,
  1822.       "silent",        V_BOOLEAN,    0,    (char **)&silent,
  1823.       "slow-mode",    V_BOOLEAN,    0,    (char **)&slow_mode,
  1824.       "slow-speed",    V_INTEGER,    0,    (char **)&slow_speed,
  1825. ***************
  1826. *** 160,165 ****
  1827. --- 172,178 ----
  1828.       "split",        V_BOOLEAN,    4,    (char **)&dont_split_digests,
  1829.       "stop",        V_INTEGER,    0,    (char **)&first_page_lines,
  1830.       "time",        V_BOOLEAN,    0,    (char **)&show_current_time,
  1831. +     "unshar-command",    V_STRING | V_SAFE, 3,    (char **)&unshar_command,
  1832.       "unshar-header-file",V_STRING,    0,    (char **)&unshar_header_file,
  1833.       "visible-bell",     V_BOOLEAN,    0,    (char **)&use_visible_bell,
  1834.       "window",        V_INTEGER,    1,    (char **)&preview_window,
  1835. ***************
  1836. *** 174,180 ****
  1837.   #define STR_VAR        (*(var->var_addr))
  1838.   #define CBUF_VAR    ((char *)(var->var_addr))
  1839.   #define KEY_VAR        (*((unsigned char *)(var->var_addr)))
  1840.   
  1841.   static struct variable_defs *lookup_variable(variable)
  1842.   char *variable;
  1843. --- 187,193 ----
  1844.   #define STR_VAR        (*(var->var_addr))
  1845.   #define CBUF_VAR    ((char *)(var->var_addr))
  1846.   #define KEY_VAR        (*((unsigned char *)(var->var_addr)))
  1847. ! #define VAR_TYPE    (var->var_type & 0xf)
  1848.   
  1849.   static struct variable_defs *lookup_variable(variable)
  1850.   char *variable;
  1851. ***************
  1852. *** 218,229 ****
  1853.       if ((var = lookup_variable(variable)) == NULL) 
  1854.       return 0;
  1855.       
  1856.       if (!on || val_string == NULL)
  1857.       value = 0;
  1858.       else    
  1859.       value = atoi(val_string);
  1860.   
  1861. !     switch (var->var_type) {
  1862.       
  1863.        case V_STRING:
  1864.   
  1865. --- 231,253 ----
  1866.       if ((var = lookup_variable(variable)) == NULL) 
  1867.       return 0;
  1868.       
  1869. +     if (!in_init && (var->var_type & (V_INIT | V_SAFE))) {
  1870. +     if (var->var_type & V_INIT) {
  1871. +         msg("'%s' can only be set in the init file", variable);
  1872. +         return 0;
  1873. +     }
  1874. +     if (shell_restrictions) {
  1875. +         msg("Restricted operation - cannot change");
  1876. +         return 0;
  1877. +     }
  1878. +     }
  1879.       if (!on || val_string == NULL)
  1880.       value = 0;
  1881.       else    
  1882.       value = atoi(val_string);
  1883.   
  1884. !     switch (VAR_TYPE) {
  1885.       
  1886.        case V_STRING:
  1887.   
  1888. ***************
  1889. *** 278,291 ****
  1890.           }    
  1891.           break;
  1892.           
  1893. -      case 3:
  1894. -         if (!in_init) {
  1895. -         msg("'%s' can only be set in the init file", variable);
  1896. -         break;
  1897. -         }
  1898. -         BOOL_VAR = on;
  1899. -         break;        
  1900.        case 4:
  1901.           BOOL_VAR = !on;
  1902.           break;
  1903. --- 302,307 ----
  1904. ***************
  1905. *** 364,370 ****
  1906.       so_printf("\1Variable settings:\1");
  1907.   
  1908.       for (var = variables; var < &variables[TABLE_SIZE]; var++) {
  1909. !     switch (var->var_type) {
  1910.        case V_STRING:
  1911.           str = (var->var_op == 1) ? CBUF_VAR : STR_VAR;
  1912.           if (str == NULL || *str == NUL) break;
  1913. --- 380,386 ----
  1914.       so_printf("\1Variable settings:\1");
  1915.   
  1916.       for (var = variables; var < &variables[TABLE_SIZE]; var++) {
  1917. !     switch (VAR_TYPE) {
  1918.        case V_STRING:
  1919.           str = (var->var_op == 1) ? CBUF_VAR : STR_VAR;
  1920.           if (str == NULL || *str == NUL) break;
  1921. ***************
  1922. *** 377,388 ****
  1923.           if (pg_next() < 0) goto out;
  1924.           b = BOOL_VAR;
  1925.           if (var->var_op == 2 || var->var_op == 4) b = !b;
  1926. !         printf("%s%s\n", b ? "" : "no", var->var_name);
  1927.           break;
  1928.           
  1929.        case V_INTEGER:
  1930.           i = INT_VAR;
  1931. -         if (i == 0) break;
  1932.           if (pg_next() < 0) goto out;
  1933.           printf("%-20.20s = %d\n", var->var_name, i);
  1934.           break;
  1935. --- 393,403 ----
  1936.           if (pg_next() < 0) goto out;
  1937.           b = BOOL_VAR;
  1938.           if (var->var_op == 2 || var->var_op == 4) b = !b;
  1939. !         printf("%s%s\n", b ? "" : "no ", var->var_name);
  1940.           break;
  1941.           
  1942.        case V_INTEGER:
  1943.           i = INT_VAR;
  1944.           if (pg_next() < 0) goto out;
  1945.           printf("%-20.20s = %d\n", var->var_name, i);
  1946.           break;
  1947. ***************
  1948. *** 417,423 ****
  1949.       register struct variable_defs *var;
  1950.       
  1951.       if ((var = lookup_variable(variable)) == NULL) return;
  1952. !     if (var->var_type != V_BOOLEAN) {
  1953.       init_message("variable %s is not boolean", variable);
  1954.       return;
  1955.       }
  1956. --- 432,438 ----
  1957.       register struct variable_defs *var;
  1958.       
  1959.       if ((var = lookup_variable(variable)) == NULL) return;
  1960. !     if (VAR_TYPE != V_BOOLEAN) {
  1961.       init_message("variable %s is not boolean", variable);
  1962.       return;
  1963.       }
  1964. ***************
  1965. *** 444,450 ****
  1966.       goto out;
  1967.       }    
  1968.   
  1969. !     switch (var->var_type) {
  1970.       
  1971.        case V_BOOLEAN:
  1972.       res = BOOL_VAR;
  1973. --- 459,465 ----
  1974.       goto out;
  1975.       }    
  1976.   
  1977. !     switch (VAR_TYPE) {
  1978.       
  1979.        case V_BOOLEAN:
  1980.       res = BOOL_VAR;
  1981.  
  1982. *** /usr/storm/nn6.3.7/xmakefile    Fri Sep  8 12:47:00 1989
  1983. --- xmakefile    Tue Sep 12 09:55:12 1989
  1984. ***************
  1985. *** 180,186 ****
  1986.       rm -f prefix.c
  1987.   
  1988.   cvt-help:    cvt-help.c
  1989. !     cc -o cvt-help cvt-help.c
  1990.   
  1991.   active.o:    active.c config.h global.h vararg.h data.h
  1992.   admin.o:    admin.c config.h global.h vararg.h data.h db.h term.h
  1993. --- 180,186 ----
  1994.       rm -f prefix.c
  1995.   
  1996.   cvt-help:    cvt-help.c
  1997. !     $(CC) -o cvt-help cvt-help.c
  1998.   
  1999.   active.o:    active.c config.h global.h vararg.h data.h
  2000.   admin.o:    admin.c config.h global.h vararg.h data.h db.h term.h
  2001.  
  2002.